package org.apache.jsp.auth;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class login_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.List _jspx_dependants;

  static {
    _jspx_dependants = new java.util.ArrayList(2);
    _jspx_dependants.add("/WEB-INF/connext-graph.tld");
    _jspx_dependants.add("/WEB-INF/webframework-tags.tld");
  }

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.AnnotationProcessor _jsp_annotationprocessor;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
  }

  public void _jspDestroy() {
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html; charset=utf-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
request.setAttribute("contextPath", request.getContextPath());
      out.write('\r');
      out.write('\n');
      out.write(' ');

    response.setHeader("Pragma","No-cache");
    response.setHeader("Cache-Control","no-cache");
    response.setDateHeader("Expires", 0);
    response.flushBuffer();
    session.invalidate();

      out.write("\r\n");
      out.write("\r\n");
      out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");
      out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n");
      out.write("<title>login</title>\r\n");
      out.write("<link href=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
      out.write("/style/form.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n");
      out.write("<script type=\"text/javascript\" src=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
      out.write("/js/prototype.js\"></script>\r\n");
      out.write("<script type=\"text/javascript\" src=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
      out.write("/js/prototype-extension.js\"></script>\r\n");
      out.write("<style>\r\n");
      out.write("html {font-size:100.01%;}\r\n");
      out.write("body{ background:url(");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath }", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
      out.write("/images/login_bg.jpg) no-repeat center top; background-color:#b5c9ea; text-align:center;font-family:\"Helvetica Neue\", Arial, Helvetica, sans-serif;}\r\n");
      out.write(".login{ width:400px; margin:0 auto; padding:300px 0 0 100px; text-align:left; font-size:12px;}\r\n");
      out.write("</style>\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");
      out.write("<div class=\"login\">\r\n");
      out.write("<form id=\"loginForm\" name=\"loginForm\" action=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
      out.write("/skip/auth.action\"  method=\"post\">\r\n");
      out.write("    <table border=\"0\">\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td><img src=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath }", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
      out.write("/images/user.png\" alt=\"username\" width=\"30\" height=\"30\" align=\"absmiddle\" />&nbsp;User name</td>\r\n");
      out.write("        <td width=\"18\"><input type=\"text\" name=\"name\" id=\"name\" size=\"18\" tabindex=\"1\" /></td>\r\n");
      out.write("        <td width=\"100\" rowspan=\"3\" align=\"center\">\r\n");
      out.write("        \t<a href=\"javascript:login();\"><img src=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath }", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
      out.write("/images/sign_in.png\" alt=\"login\" width=\"56\" height=\"105\"  style=\"margin-top:10px\" align=\"absmiddle\" border=\"0\" /></a></td>\r\n");
      out.write("      </tr>\r\n");
      out.write("      <tr>\r\n");
      out.write("        <td><img src=\"");
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${contextPath }", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
      out.write("/images/password.png\" width=\"30\" height=\"30\" align=\"absmiddle\" />&nbsp;Password</td>\r\n");
      out.write("        <td><input type=\"password\" name=\"passwd\" id=\"passwd\" size=\"19\" tabindex=\"2\" /></td>\r\n");
      out.write("        <td></td>\r\n");
      out.write("      </tr>\r\n");
      out.write("    </table>\r\n");
      out.write("</form>    \r\n");
      out.write("</div>\r\n");
      out.write("\r\n");
      out.write("<script type=\"text/javascript\">\r\n");
      out.write("\r\n");
      out.write(" function login() {\r\n");
      out.write("\tif ($('name').value.strip() == '') {\r\n");
      out.write("\t\talert('请输入用户名');\r\n");
      out.write("\t\t$('name').focus();\r\n");
      out.write("\t\treturn;\r\n");
      out.write("\t}\r\n");
      out.write("\tvar pattern_cn = /^([_\\a-zA-Z0-9])*$/gi;\r\n");
      out.write("\tif(!pattern_cn.test($('name').value.strip())){\r\n");
      out.write("\t\talert(\"用户名无效!\");\r\n");
      out.write("\t\treturn;\r\n");
      out.write("\t}\r\n");
      out.write("\tvar pattern_len_usr = /^[_\\a-zA-Z0-9]{4,15}$/;\r\n");
      out.write("\tif(!pattern_len_usr.test($('name').value.strip())){\r\n");
      out.write("\t\talert(\"用户名长度为4至15位\");\r\n");
      out.write("\t\treturn;\r\n");
      out.write("\t}\r\n");
      out.write("\tif ($('passwd').value.strip() == '') {\r\n");
      out.write("\t\talert('请输入密码');\r\n");
      out.write("\t\t$('passwd').focus();\r\n");
      out.write("\t\treturn;\r\n");
      out.write("\t}\r\n");
      out.write("\tvar pattern_len_pwd = /^[_\\a-zA-Z0-9]{4,15}$/;\r\n");
      out.write("\tif(!pattern_len_pwd.test($('passwd').value.strip())){\r\n");
      out.write("\t\talert(\"密码长度为4至15位\");\r\n");
      out.write("\t\treturn;\r\n");
      out.write("\t}\r\n");
      out.write("\t$('loginForm').submit();\r\n");
      out.write(" }\r\n");
      out.write("\r\n");
      out.write("\t$('loginForm').observe('keypress', function(event){\r\n");
      out.write("\t\tif (event.keyCode == 13) {\r\n");
      out.write("\t\t\tlogin();\r\n");
      out.write("\t\t};\r\n");
      out.write("\t});\r\n");
      out.write("\t\t\t\r\n");
      out.write("\r\n");
      out.write("</script>\r\n");
      out.write("</body>\r\n");
      out.write("</html>");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
